<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcoap: pdu.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">libcoap<span id="projectnumber">&#160;4.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('pdu_8c.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle"><div class="title">pdu.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;coap_config.h&quot;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &quot;<a class="el" href="libcoap_8h_source.html">libcoap.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="coap__debug_8h_source.html">coap_debug.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="pdu_8h_source.html">pdu.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="option_8h_source.html">option.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="encode_8h_source.html">encode.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="mem_8h_source.html">mem.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="coap__session_8h_source.html">coap_session.h</a>&quot;</code><br />
</div>
<p><a href="pdu_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structerror__desc__t.html">error_desc_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ac6afabdc09a49a433ee19d8a9486056d" id="r_ac6afabdc09a49a433ee19d8a9486056d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#ac6afabdc09a49a433ee19d8a9486056d">min</a>(a,  b)&#160;&#160;&#160;((a) &lt; (b) ? (a) : (b))</td></tr>
<tr class="separator:ac6afabdc09a49a433ee19d8a9486056d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affe776513b24d84b39af8ab0930fef7f" id="r_affe776513b24d84b39af8ab0930fef7f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#affe776513b24d84b39af8ab0930fef7f">max</a>(a,  b)&#160;&#160;&#160;((a) &gt; (b) ? (a) : (b))</td></tr>
<tr class="separator:affe776513b24d84b39af8ab0930fef7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a9dbdf354e2da5e80fea4c0d4a8df6d05" id="r_a9dbdf354e2da5e80fea4c0d4a8df6d05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a9dbdf354e2da5e80fea4c0d4a8df6d05">coap_pdu_clear</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, size_t size)</td></tr>
<tr class="memdesc:a9dbdf354e2da5e80fea4c0d4a8df6d05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears any contents from <code>pdu</code> and resets <code>used_size</code>, and <code>data</code> pointers.  <br /></td></tr>
<tr class="separator:a9dbdf354e2da5e80fea4c0d4a8df6d05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f019ad11b0f633524175488aecbd7d1" id="r_a4f019ad11b0f633524175488aecbd7d1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a4f019ad11b0f633524175488aecbd7d1">coap_pdu_init</a> (<a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> type, <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> code, uint16_t tid, size_t size)</td></tr>
<tr class="memdesc:a4f019ad11b0f633524175488aecbd7d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new CoAP PDU with at least enough storage space for the given <code>size</code> maximum message size.  <br /></td></tr>
<tr class="separator:a4f019ad11b0f633524175488aecbd7d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade1a728d3049d57703d805e71d0a38dd" id="r_ade1a728d3049d57703d805e71d0a38dd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#ade1a728d3049d57703d805e71d0a38dd">coap_new_pdu</a> (const struct <a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:ade1a728d3049d57703d805e71d0a38dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new CoAP PDU.  <br /></td></tr>
<tr class="separator:ade1a728d3049d57703d805e71d0a38dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48581f968a30ef4278702eb1c16b7a90" id="r_a48581f968a30ef4278702eb1c16b7a90"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a48581f968a30ef4278702eb1c16b7a90">coap_delete_pdu</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu)</td></tr>
<tr class="memdesc:a48581f968a30ef4278702eb1c16b7a90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dispose of an CoAP PDU and frees associated storage.  <br /></td></tr>
<tr class="separator:a48581f968a30ef4278702eb1c16b7a90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add46ce956878a4121e8887b84c6d4a6b" id="r_add46ce956878a4121e8887b84c6d4a6b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#add46ce956878a4121e8887b84c6d4a6b">coap_pdu_resize</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, size_t new_size)</td></tr>
<tr class="memdesc:add46ce956878a4121e8887b84c6d4a6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dynamically grows the size of <code>pdu</code> to <code>new_size</code>.  <br /></td></tr>
<tr class="separator:add46ce956878a4121e8887b84c6d4a6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af25c1916c60fdcf35cd4e178aebbb867" id="r_af25c1916c60fdcf35cd4e178aebbb867"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#af25c1916c60fdcf35cd4e178aebbb867">coap_pdu_check_resize</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, size_t size)</td></tr>
<tr class="separator:af25c1916c60fdcf35cd4e178aebbb867"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a923f81168ccbbaac1a4ca50837d7be94" id="r_a923f81168ccbbaac1a4ca50837d7be94"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a923f81168ccbbaac1a4ca50837d7be94">coap_add_token</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, size_t len, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data)</td></tr>
<tr class="memdesc:a923f81168ccbbaac1a4ca50837d7be94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds token of length <code>len</code> to <code>pdu</code>.  <br /></td></tr>
<tr class="separator:a923f81168ccbbaac1a4ca50837d7be94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1314f60fbc25733cfabaa975adc5aae" id="r_aa1314f60fbc25733cfabaa975adc5aae"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#aa1314f60fbc25733cfabaa975adc5aae">coap_add_option</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, uint16_t type, size_t len, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data)</td></tr>
<tr class="memdesc:aa1314f60fbc25733cfabaa975adc5aae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds option of given type to pdu that is passed as first parameter.  <br /></td></tr>
<tr class="separator:aa1314f60fbc25733cfabaa975adc5aae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47b43066ecb3584af0c425b8ee97db20" id="r_a47b43066ecb3584af0c425b8ee97db20"><td class="memItemLeft" align="right" valign="top"><a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a47b43066ecb3584af0c425b8ee97db20">coap_add_option_later</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, uint16_t type, size_t len)</td></tr>
<tr class="memdesc:a47b43066ecb3584af0c425b8ee97db20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds option of given type to pdu that is passed as first parameter, but does not write a value.  <br /></td></tr>
<tr class="separator:a47b43066ecb3584af0c425b8ee97db20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af71a3f810ab9f0f657c25c425826af40" id="r_af71a3f810ab9f0f657c25c425826af40"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#af71a3f810ab9f0f657c25c425826af40">coap_add_data</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, size_t len, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data)</td></tr>
<tr class="memdesc:af71a3f810ab9f0f657c25c425826af40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds given data to the pdu that is passed as first parameter.  <br /></td></tr>
<tr class="separator:af71a3f810ab9f0f657c25c425826af40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b73fa26504e7a8da604375d1146b7e3" id="r_a3b73fa26504e7a8da604375d1146b7e3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a3b73fa26504e7a8da604375d1146b7e3">coap_add_data_after</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, size_t len)</td></tr>
<tr class="memdesc:a3b73fa26504e7a8da604375d1146b7e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds given data to the pdu that is passed as first parameter but does not copyt it.  <br /></td></tr>
<tr class="separator:a3b73fa26504e7a8da604375d1146b7e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6701e5ec876a5ce59c7892f66d46c67b" id="r_a6701e5ec876a5ce59c7892f66d46c67b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a6701e5ec876a5ce59c7892f66d46c67b">coap_get_data</a> (const <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, size_t *len, <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> **data)</td></tr>
<tr class="memdesc:a6701e5ec876a5ce59c7892f66d46c67b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the length and data pointer of specified PDU.  <br /></td></tr>
<tr class="separator:a6701e5ec876a5ce59c7892f66d46c67b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0820d2413f167cd92f8267bf0aaa6ecb" id="r_a0820d2413f167cd92f8267bf0aaa6ecb"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a0820d2413f167cd92f8267bf0aaa6ecb">coap_response_phrase</a> (unsigned char code)</td></tr>
<tr class="memdesc:a0820d2413f167cd92f8267bf0aaa6ecb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a human-readable response phrase for the specified CoAP response <code>code</code>.  <br /></td></tr>
<tr class="separator:a0820d2413f167cd92f8267bf0aaa6ecb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a5660500af5276ede2c7472958f2826" id="r_a1a5660500af5276ede2c7472958f2826"><td class="memItemLeft" align="right" valign="top">static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a1a5660500af5276ede2c7472958f2826">next_option_safe</a> (<a class="el" href="option_8h.html#a963ad4994625360a5ac70d9df2ab5412">coap_opt_t</a> **optp, size_t *length)</td></tr>
<tr class="memdesc:a1a5660500af5276ede2c7472958f2826"><td class="mdescLeft">&#160;</td><td class="mdescRight">Advances *optp to next option if still in PDU.  <br /></td></tr>
<tr class="separator:a1a5660500af5276ede2c7472958f2826"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53c48f11ca3bc0d2106bd8b76f7430c8" id="r_a53c48f11ca3bc0d2106bd8b76f7430c8"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a53c48f11ca3bc0d2106bd8b76f7430c8">coap_pdu_parse_header_size</a> (<a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data)</td></tr>
<tr class="memdesc:a53c48f11ca3bc0d2106bd8b76f7430c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interprets <code>data</code> to determine the number of bytes in the header.  <br /></td></tr>
<tr class="separator:a53c48f11ca3bc0d2106bd8b76f7430c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9460a91b9a9747bc85ff8e48a00f4d1" id="r_ad9460a91b9a9747bc85ff8e48a00f4d1"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#ad9460a91b9a9747bc85ff8e48a00f4d1">coap_pdu_parse_size</a> (<a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, size_t length)</td></tr>
<tr class="memdesc:ad9460a91b9a9747bc85ff8e48a00f4d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses <code>data</code> to extract the message size.  <br /></td></tr>
<tr class="separator:ad9460a91b9a9747bc85ff8e48a00f4d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a516ac8dae1f2fe33963f80cf15ec59a0" id="r_a516ac8dae1f2fe33963f80cf15ec59a0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a516ac8dae1f2fe33963f80cf15ec59a0">coap_pdu_parse_header</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto)</td></tr>
<tr class="memdesc:a516ac8dae1f2fe33963f80cf15ec59a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode the protocol specific header for the specified PDU.  <br /></td></tr>
<tr class="separator:a516ac8dae1f2fe33963f80cf15ec59a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7fbcbe0f8d7415e82447747abf31d51" id="r_aa7fbcbe0f8d7415e82447747abf31d51"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#aa7fbcbe0f8d7415e82447747abf31d51">coap_pdu_parse_opt</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu)</td></tr>
<tr class="memdesc:aa7fbcbe0f8d7415e82447747abf31d51"><td class="mdescLeft">&#160;</td><td class="mdescRight">Verify consistency in the given CoAP PDU structure and locate the data.  <br /></td></tr>
<tr class="separator:aa7fbcbe0f8d7415e82447747abf31d51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9981ea277da8bc4e5c4f82d6ca4c006" id="r_ab9981ea277da8bc4e5c4f82d6ca4c006"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#ab9981ea277da8bc4e5c4f82d6ca4c006">coap_pdu_parse</a> (<a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, size_t length, <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu)</td></tr>
<tr class="memdesc:ab9981ea277da8bc4e5c4f82d6ca4c006"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses <code>data</code> into the CoAP PDU structure given in <code>result</code>.  <br /></td></tr>
<tr class="separator:ab9981ea277da8bc4e5c4f82d6ca4c006"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5e81fe5717f977c62b7ef427d946c35" id="r_ab5e81fe5717f977c62b7ef427d946c35"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#ab5e81fe5717f977c62b7ef427d946c35">coap_pdu_encode_header</a> (<a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto)</td></tr>
<tr class="memdesc:ab5e81fe5717f977c62b7ef427d946c35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compose the protocol specific header for the specified PDU.  <br /></td></tr>
<tr class="separator:ab5e81fe5717f977c62b7ef427d946c35"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a48518e7e0d3c7b91a3a4efb3d6eac23c" id="r_a48518e7e0d3c7b91a3a4efb3d6eac23c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structerror__desc__t.html">error_desc_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdu_8c.html#a48518e7e0d3c7b91a3a4efb3d6eac23c">coap_error</a> []</td></tr>
<tr class="separator:a48518e7e0d3c7b91a3a4efb3d6eac23c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="affe776513b24d84b39af8ab0930fef7f" name="affe776513b24d84b39af8ab0930fef7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affe776513b24d84b39af8ab0930fef7f">&#9670;&#160;</a></span>max</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define max</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">b&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((a) &gt; (b) ? (a) : (b))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00042">42</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="ac6afabdc09a49a433ee19d8a9486056d" name="ac6afabdc09a49a433ee19d8a9486056d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6afabdc09a49a433ee19d8a9486056d">&#9670;&#160;</a></span>min</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define min</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">b&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((a) &lt; (b) ? (a) : (b))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00038">38</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="af71a3f810ab9f0f657c25c425826af40" name="af71a3f810ab9f0f657c25c425826af40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af71a3f810ab9f0f657c25c425826af40">&#9670;&#160;</a></span>coap_add_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int coap_add_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds given data to the pdu that is passed as first parameter. </p>
<p>Note that the PDU's data is destroyed by <a class="el" href="pdu_8h.html#aa1314f60fbc25733cfabaa975adc5aae" title="Adds option of given type to pdu that is passed as first parameter.">coap_add_option()</a>. <a class="el" href="pdu_8h.html#af71a3f810ab9f0f657c25c425826af40" title="Adds given data to the pdu that is passed as first parameter.">coap_add_data()</a> must be called only once per PDU, otherwise the result is undefined. </p>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00302">302</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a3b73fa26504e7a8da604375d1146b7e3" name="a3b73fa26504e7a8da604375d1146b7e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b73fa26504e7a8da604375d1146b7e3">&#9670;&#160;</a></span>coap_add_data_after()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> * coap_add_data_after </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds given data to the pdu that is passed as first parameter but does not copyt it. </p>
<p>Note that the PDU's data is destroyed by <a class="el" href="pdu_8h.html#aa1314f60fbc25733cfabaa975adc5aae" title="Adds option of given type to pdu that is passed as first parameter.">coap_add_option()</a>. <a class="el" href="pdu_8h.html#af71a3f810ab9f0f657c25c425826af40" title="Adds given data to the pdu that is passed as first parameter.">coap_add_data()</a> must be have been called once for this PDU, otherwise the result is undefined. The actual data must be copied at the returned location. </p>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00314">314</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="aa1314f60fbc25733cfabaa975adc5aae" name="aa1314f60fbc25733cfabaa975adc5aae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1314f60fbc25733cfabaa975adc5aae">&#9670;&#160;</a></span>coap_add_option()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t coap_add_option </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds option of given type to pdu that is passed as first parameter. </p>
<p><a class="el" href="pdu_8h.html#aa1314f60fbc25733cfabaa975adc5aae" title="Adds option of given type to pdu that is passed as first parameter.">coap_add_option()</a> destroys the PDU's data, so <a class="el" href="pdu_8h.html#af71a3f810ab9f0f657c25c425826af40" title="Adds given data to the pdu that is passed as first parameter.">coap_add_data()</a> must be called after all options have been added. As <a class="el" href="pdu_8h.html#a923f81168ccbbaac1a4ca50837d7be94" title="Adds token of length len to pdu.">coap_add_token()</a> destroys the options following the token, the token must be added before <a class="el" href="pdu_8h.html#aa1314f60fbc25733cfabaa975adc5aae" title="Adds option of given type to pdu that is passed as first parameter.">coap_add_option()</a> is called. This function returns the number of bytes written or <code>0</code> on error. </p>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00229">229</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a47b43066ecb3584af0c425b8ee97db20" name="a47b43066ecb3584af0c425b8ee97db20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47b43066ecb3584af0c425b8ee97db20">&#9670;&#160;</a></span>coap_add_option_later()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> * coap_add_option_later </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds option of given type to pdu that is passed as first parameter, but does not write a value. </p>
<p>It works like coap_add_option with respect to calling sequence (i.e. after token and before data). This function returns a memory address to which the option data has to be written before the PDU can be sent, or <code>NULL</code> on error. </p>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00266">266</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a923f81168ccbbaac1a4ca50837d7be94" name="a923f81168ccbbaac1a4ca50837d7be94"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a923f81168ccbbaac1a4ca50837d7be94">&#9670;&#160;</a></span>coap_add_token()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int coap_add_token </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds token of length <code>len</code> to <code>pdu</code>. </p>
<p>Adding the token destroys any following contents of the pdu. Hence options and data must be added after <a class="el" href="pdu_8h.html#a923f81168ccbbaac1a4ca50837d7be94" title="Adds token of length len to pdu.">coap_add_token()</a> has been called. In <code>pdu</code>, length is set to <code>len</code> + <code>4</code>, and max_delta is set to <code>0</code>. This function returns <code>0</code> on error or a value greater than zero on success.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pdu</td><td>The PDU where the token is to be added. </td></tr>
    <tr><td class="paramname">len</td><td>The length of the new token. </td></tr>
    <tr><td class="paramname">data</td><td>The token to add.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A value greater than zero on success, or <code>0</code> on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00205">205</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a48581f968a30ef4278702eb1c16b7a90" name="a48581f968a30ef4278702eb1c16b7a90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48581f968a30ef4278702eb1c16b7a90">&#9670;&#160;</a></span>coap_delete_pdu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_delete_pdu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Dispose of an CoAP PDU and frees associated storage. </p>
<p>Not that in general you should not call this function directly. When a PDU is sent with <a class="el" href="net_8c.html#ab0b0b5db03427c4313c01ec2b12cf8ed" title="Sends a CoAP message to given peer.">coap_send()</a>, <a class="el" href="pdu_8h.html#aad4941e111fdd57ed08b614bb9e7f594" title="Dispose of an CoAP PDU and frees associated storage.">coap_delete_pdu()</a> will be called automatically for you. </p>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00141">141</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a6701e5ec876a5ce59c7892f66d46c67b" name="a6701e5ec876a5ce59c7892f66d46c67b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6701e5ec876a5ce59c7892f66d46c67b">&#9670;&#160;</a></span>coap_get_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int coap_get_data </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> **&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves the length and data pointer of specified PDU. </p>
<p>Returns 0 on error or 1 if *len and *data have correct values. Note that these values are destroyed with the pdu. </p>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00332">332</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="ade1a728d3049d57703d805e71d0a38dd" name="ade1a728d3049d57703d805e71d0a38dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade1a728d3049d57703d805e71d0a38dd">&#9670;&#160;</a></span>coap_new_pdu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> * coap_new_pdu </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new CoAP PDU. </p>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00131">131</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="af25c1916c60fdcf35cd4e178aebbb867" name="af25c1916c60fdcf35cd4e178aebbb867"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af25c1916c60fdcf35cd4e178aebbb867">&#9670;&#160;</a></span>coap_pdu_check_resize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int coap_pdu_check_resize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00188">188</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a9dbdf354e2da5e80fea4c0d4a8df6d05" name="a9dbdf354e2da5e80fea4c0d4a8df6d05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9dbdf354e2da5e80fea4c0d4a8df6d05">&#9670;&#160;</a></span>coap_pdu_clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_pdu_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears any contents from <code>pdu</code> and resets <code>used_size</code>, and <code>data</code> pointers. </p>
<p><code>max_size</code> is set to <code>size</code>, any other field is set to <code>0</code>. Note that <code>pdu</code> must be a valid pointer to a <a class="el" href="structcoap__pdu__t.html" title="structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload mark...">coap_pdu_t</a> object created e.g. by <a class="el" href="pdu_8h.html#a4f019ad11b0f633524175488aecbd7d1" title="Creates a new CoAP PDU with at least enough storage space for the given size maximum message size.">coap_pdu_init()</a>. </p>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00046">46</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="ab5e81fe5717f977c62b7ef427d946c35" name="ab5e81fe5717f977c62b7ef427d946c35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5e81fe5717f977c62b7ef427d946c35">&#9670;&#160;</a></span>coap_pdu_encode_header()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t coap_pdu_encode_header </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compose the protocol specific header for the specified PDU. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pdu</td><td>A newly composed PDU. </td></tr>
    <tr><td class="paramname">proto</td><td>The target wire protocol. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of header bytes prepended before pdu-&gt;token or 0 on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00582">582</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a4f019ad11b0f633524175488aecbd7d1" name="a4f019ad11b0f633524175488aecbd7d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f019ad11b0f633524175488aecbd7d1">&#9670;&#160;</a></span>coap_pdu_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> * coap_pdu_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>tid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new CoAP PDU with at least enough storage space for the given <code>size</code> maximum message size. </p>
<p>The function returns a pointer to the node <a class="el" href="structcoap__pdu__t.html" title="structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload mark...">coap_pdu_t</a> object on success, or <code>NULL</code> on error. The storage allocated for the result must be released with <a class="el" href="pdu_8h.html#aad4941e111fdd57ed08b614bb9e7f594" title="Dispose of an CoAP PDU and frees associated storage.">coap_delete_pdu()</a> if <a class="el" href="net_8c.html#ab0b0b5db03427c4313c01ec2b12cf8ed" title="Sends a CoAP message to given peer.">coap_send()</a> is not called.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>The type of the PDU (one of COAP_MESSAGE_CON, COAP_MESSAGE_NON, COAP_MESSAGE_ACK, COAP_MESSAGE_RST). </td></tr>
    <tr><td class="paramname">code</td><td>The message code. </td></tr>
    <tr><td class="paramname">tid</td><td>The transcation id to set or 0 if unknown / not applicable. </td></tr>
    <tr><td class="paramname">size</td><td>The maximum allowed number of byte for the message. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the new PDU object or <code>NULL</code> on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00091">91</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="ab9981ea277da8bc4e5c4f82d6ca4c006" name="ab9981ea277da8bc4e5c4f82d6ca4c006"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9981ea277da8bc4e5c4f82d6ca4c006">&#9670;&#160;</a></span>coap_pdu_parse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int coap_pdu_parse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parses <code>data</code> into the CoAP PDU structure given in <code>result</code>. </p>
<p>The target pdu must be large enough to This function returns <code>0</code> on error or a number greater than zero on success.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">proto</td><td>Session's protocol </td></tr>
    <tr><td class="paramname">data</td><td>The raw data to parse as CoAP PDU. </td></tr>
    <tr><td class="paramname">length</td><td>The actual size of <code>data</code>. </td></tr>
    <tr><td class="paramname">pdu</td><td>The PDU structure to fill. Note that the structure must provide space to hold at least the token and options part of the message.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 on success or <code>0</code> on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00557">557</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a516ac8dae1f2fe33963f80cf15ec59a0" name="a516ac8dae1f2fe33963f80cf15ec59a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a516ac8dae1f2fe33963f80cf15ec59a0">&#9670;&#160;</a></span>coap_pdu_parse_header()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int coap_pdu_parse_header </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decode the protocol specific header for the specified PDU. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pdu</td><td>A newly received PDU. </td></tr>
    <tr><td class="paramname">proto</td><td>The target wire protocol. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 for success or 0 on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00474">474</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a53c48f11ca3bc0d2106bd8b76f7430c8" name="a53c48f11ca3bc0d2106bd8b76f7430c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53c48f11ca3bc0d2106bd8b76f7430c8">&#9670;&#160;</a></span>coap_pdu_parse_header_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t coap_pdu_parse_header_size </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Interprets <code>data</code> to determine the number of bytes in the header. </p>
<p>This function returns <code>0</code> on error or a number greater than zero on success.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">proto</td><td>Session's protocol </td></tr>
    <tr><td class="paramname">data</td><td>The first byte of raw data to parse as CoAP PDU.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A value greater than zero on success or <code>0</code> on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00419">419</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="aa7fbcbe0f8d7415e82447747abf31d51" name="aa7fbcbe0f8d7415e82447747abf31d51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7fbcbe0f8d7415e82447747abf31d51">&#9670;&#160;</a></span>coap_pdu_parse_opt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int coap_pdu_parse_opt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Verify consistency in the given CoAP PDU structure and locate the data. </p>
<p>This function returns <code>0</code> on error or a number greater than zero on success. This function only parses the token and options, up to the payload start marker.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pdu</td><td>The PDU structure to.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 on success or <code>0</code> on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00506">506</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="ad9460a91b9a9747bc85ff8e48a00f4d1" name="ad9460a91b9a9747bc85ff8e48a00f4d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9460a91b9a9747bc85ff8e48a00f4d1">&#9670;&#160;</a></span>coap_pdu_parse_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t coap_pdu_parse_size </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parses <code>data</code> to extract the message size. </p>
<p><code>length</code> must be at least coap_pdu_parse_header_size(proto, data). This function returns <code>0</code> on error or a number greater than zero on success.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">proto</td><td>Session's protocol </td></tr>
    <tr><td class="paramname">data</td><td>The raw data to parse as CoAP PDU. </td></tr>
    <tr><td class="paramname">length</td><td>The actual size of <code>data</code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A value greater than zero on success or <code>0</code> on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00442">442</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="add46ce956878a4121e8887b84c6d4a6b" name="add46ce956878a4121e8887b84c6d4a6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add46ce956878a4121e8887b84c6d4a6b">&#9670;&#160;</a></span>coap_pdu_resize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int coap_pdu_resize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>new_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Dynamically grows the size of <code>pdu</code> to <code>new_size</code>. </p>
<p>The new size must not exceed the PDU's configure maximum size. On success, this function returns 1, otherwise 0.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pdu</td><td>The PDU to resize. </td></tr>
    <tr><td class="paramname">new_size</td><td>The new size in bytes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the operation succeeded, 0 otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00154">154</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a0820d2413f167cd92f8267bf0aaa6ecb" name="a0820d2413f167cd92f8267bf0aaa6ecb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0820d2413f167cd92f8267bf0aaa6ecb">&#9670;&#160;</a></span>coap_response_phrase()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char * coap_response_phrase </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>code</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a human-readable response phrase for the specified CoAP response <code>code</code>. </p>
<p>This function returns <code>NULL</code> if not found.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">code</td><td>The response code for which the literal phrase should be retrieved.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A zero-terminated string describing the error, or <code>NULL</code> if not found. </dd></dl>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00384">384</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<a id="a1a5660500af5276ede2c7472958f2826" name="a1a5660500af5276ede2c7472958f2826"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a5660500af5276ede2c7472958f2826">&#9670;&#160;</a></span>next_option_safe()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static size_t next_option_safe </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="option_8h.html#a963ad4994625360a5ac70d9df2ab5412">coap_opt_t</a> **&#160;</td>
          <td class="paramname"><em>optp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Advances *optp to next option if still in PDU. </p>
<p>This function returns the number of bytes opt has been advanced or <code>0</code> on error. </p>

<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00400">400</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a48518e7e0d3c7b91a3a4efb3d6eac23c" name="a48518e7e0d3c7b91a3a4efb3d6eac23c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48518e7e0d3c7b91a3a4efb3d6eac23c">&#9670;&#160;</a></span>coap_error</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structerror__desc__t.html">error_desc_t</a> coap_error[]</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(201), <span class="stringliteral">&quot;Created&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(202), <span class="stringliteral">&quot;Deleted&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(203), <span class="stringliteral">&quot;Valid&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(204), <span class="stringliteral">&quot;Changed&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(205), <span class="stringliteral">&quot;Content&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(231), <span class="stringliteral">&quot;Continue&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(400), <span class="stringliteral">&quot;Bad Request&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(401), <span class="stringliteral">&quot;Unauthorized&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(402), <span class="stringliteral">&quot;Bad Option&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(403), <span class="stringliteral">&quot;Forbidden&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(404), <span class="stringliteral">&quot;Not Found&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(405), <span class="stringliteral">&quot;Method Not Allowed&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(406), <span class="stringliteral">&quot;Not Acceptable&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(408), <span class="stringliteral">&quot;Request Entity Incomplete&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(412), <span class="stringliteral">&quot;Precondition Failed&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(413), <span class="stringliteral">&quot;Request Entity Too Large&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(415), <span class="stringliteral">&quot;Unsupported Content-Format&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(500), <span class="stringliteral">&quot;Internal Server Error&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(501), <span class="stringliteral">&quot;Not Implemented&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(502), <span class="stringliteral">&quot;Bad Gateway&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(503), <span class="stringliteral">&quot;Service Unavailable&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(504), <span class="stringliteral">&quot;Gateway Timeout&quot;</span> },</div>
<div class="line">  { <a class="code hl_define" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a>(505), <span class="stringliteral">&quot;Proxying Not Supported&quot;</span> },</div>
<div class="line">  { 0, NULL }                        </div>
<div class="line">}</div>
<div class="ttc" id="apdu_8h_html_a651de743c1ff3168c875820cf327b1d6"><div class="ttname"><a href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">COAP_RESPONSE_CODE</a></div><div class="ttdeci">#define COAP_RESPONSE_CODE(N)</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00132">pdu.h:132</a></div></div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="pdu_8c_source.html#l00356">356</a> of file <a class="el" href="pdu_8c_source.html">pdu.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="pdu_8c.html">pdu.c</a></li>
    <li class="footer">Generated on Fri Dec 27 2024 09:57:44 for libcoap by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
  </ul>
</div>
</body>
</html>
